home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-07-16 | 12.4 KB | 282 lines | [TEXT/Edt7] |
- Cloaker
- by Grant Guenther
-
- •What is Cloaker?
-
- Cloaker is a program that will move resources, either to other types
- or to a text file. You can also encrypt your resources.
-
- •Why did you make Cloaker?
-
- So programmers don't have to worry about hackers and other types
- snooping around their resource forks looking for goodies or easter
- eggs...
-
- •But why would i want to use this?
-
- Several reasons. First of all, if you're making a program and, for
- example, you want a PICT resource but you don't want any ResEdit hackers
- to know that it even exists. you can use Cloaker to move the PICT
- resource as another type of resource. For further protection, you
- can even encoded the PICT and hardcode the decode in your program
- (i've done it in this one).
-
- Maybe there are some resources in a program you want to save as a text
- file. For instance, i knew of some Raw data pictures in this one
- program that i wanted to extract. I had to manually cut-and-paste
- segments of it, hoping i didn't make a mistake, and then try decoding
- it. With Cloaker, you can simply save that resource into a text file!
-
- Lastly, if you wanted to send encrypted files to friends, this will
- do that. It's not what it's really intended for, and not the best
- program to do so, but it IS possible and nearly impossible for any
- others to identify as "Whacked." You could, in fact, use it as
- personal protection--maybe you don't want anyone else do know about
- your "GIF collection"...
-
- There is another use, of which i'm a little reluctant to suggest: you
- could "piggyback" files on Macintosh archives and upload to Mac
- boards. For instance, you could take a GIF, save it as a resource on
- another GIF, and upload that file (or stuff it first). The piggyback
- GIF would probably not be found for a long time.
-
- That comes from a previous idea: if the user has the coding to
- display GIFs or covert GIFs->Picts, he can save his graphic data
- as GIFs (or JPEGS or whatever mows his lawn) instead of PICTs.
-
- For all this and more, I felt that $5 was enough...
-
- •I noticed a similarity between this and Torgo...
-
- that's because i wrote this one right after i finished Torgo 1.0a.
- I used much of the same coding and ideas. In fact, it was while
- i was writing Torgo that i found a need for this program. I wanted
- to move a resource from one type to another, but i couldn't--the
- resource was too big to cut-and-paste hex, so i couldn't possibly
- save it to either a text file OR the desired resource. I toyed around
- with the resource manager some, and did a quick-job doing it. i
- expanded that quick job to this.
-
-
- •What happens if i try to "replace" a file when i save?
-
- it all depends on what kind of file you're saving. if you're saving
- a data file -> a resource file, then the file will NOT be replaced--
- rather, the resource you requested will be added. i made this so
- so you wouldn't have to create several files for several conversions--
- you could save all your resources in one file.
-
- if you save a resource -> a data file, the data fork will be replaced
- but the resources should remain intact.
-
- if you are encoding or decoding a file, the file will be replaced with
- the new one, resource fork and all.
-
-
- •Why the difference between "normal" data files and PICT data files?
-
- When a program opens a PICT resource, it differs greatly than the
- same picture as a PICT data file. What's the difference? the data
- file has a header--it tells certain information about the picture,
- mostly a palette of colors to use. Resource picts use the System
- Palette. When you want to edit and save a picture with a graphic
- editor and use it as a resource in your program, save it as a PICT,
- run Cloaker, and save it to a resource from a PICT source. As a
- test, do this, and save it as a resource type PICT. Use resedit
- to open your file. you should see the pict you just imported! (unless
- you didn't use the system palette)
-
- When you import pict data files, the header is chopped off. this
- also means that, if you export a resource to a data file, you cannot
- open that data file as a pict (even if you changed the file type).
- no program will open it because it first reads a header...a header
- that's missing in your data file. the solution? use resedit, open
- your resource as a pict (you may have to move it to a PICT resource),
- copy, and paste in your graphic editor.
-
-
- •I moved a resource, but all it did was make a copy (ie the original
- resource didn't disappear)
-
- good...it shouldn't! tampering with resources is a dangerous thing,
- and i didn't think that everyone wanted me to erase their resources
- for them. the original reason i started this program, remember is that
- i wanted to move a resource from one type to another, and i could not.
- i had no means to. this fufills that need. if you want the original
- resource deleted, then i suggest you erase it yourself with ResEdit.
-
- •I noticed another kind of conversion: PICT -> StartUpScreen. Explain.
-
- I noticed that it was inconvienent to try and remove a PICT resource
- from a program without hassling around with cutting and pasting
- (assuming you have the memory to cut and paste the picture). Cloaker
- was originally designed for tasks like this at hand.
-
- What a startup screen is: if you save a picture file of type
- StartUpScreen (a popular format--it's available with GifConverter,
- GraphicsConverter, SuperPaint, Adobe Photoshop, and others). It is
- file that has a PICT resource of ID 0 in it. If you save this picture
- named StartUpScreen and put it into your System Folder, your Macintosh
- will read this file and show it at startup (instead of "Welcome to
- Macintosh").
-
- If you convert a PICT resource to a StartUpScreen, you can use the
- above programs to open that picture.
-
- •What's this "AWB?"
-
- AWB (_A_NSI _W_anna_B_e) is a Ascii Art file. If you've used my
- Text Modifer, you should be familiar with this. In fact, it's the
- same as in Text Modifier, except now instead of relying on .raw data
- files, you can use PICTs!
-
- What does it do? It takes a PICT and converts it into an Ascii art
- file. You might want to note the following:
-
- a) Since this program converts the colors to black and white (and,
- in fact, takes your colors and converts them to system 256 colors),
- you may want to adjust your picture in greys (perhaps by changing
- it to standard 256 colors, and, better yet, reduced to 32 colors).
-
- b) You may want to scale your PICTs to 75x??? pictures. Most word
- processors have difficulty viewing texts with more than 80 lines
- (if you're using a standard font size 9). This program does not
- scale it for you.
-
- c) The BEST font to use, as I've seen, is IBMKlone, if you can find
- it. The second is Pica, and the next is Monaco. You can use
- whatever size you want; i suggest 9 for most uses.
-
- d) If you want to print you AWB on more than one page horizontally,
- Text Modifier 1.5 will help you cut large files in that way.
-
- e) I MIGHT in the future make a AWB->PICT converter. (I have it
- ready in my coding). However, i won't unless demand is great enough.
-
- •What's all in this package?
-
- -Cloaker: the main feature.
- -Whacked.lib, Whacked lib.h: Library and header file for Whacked
- encryption.
- -test: A file that contains a whacked PICT in it. Try it out!
- It is a full PICT (ie has a header), encrypted with keys
- 1, 2, and 3 on, and "Hello World" as the key (no quotes;
- case sensitive). First save the resource "test" id 128 as a
- data file. Then decode and save as "test." Use any program
- that opens PICTs to view it. (You will need to change the
- file type with ResEdit, Hax, FileLift, etc. to 'PICT').
-
- -Cloaker ReadMe: the file you're reading right now!
-
- -Kewl Finder.pict / Kewl Finder.AWG: A demonstration of AWB.
-
- •Tell me about this "whacked" code.
-
- The Whacked Encryption Alogrithm (WEA) is a very small and simple
- encryption sequence. At the same time, it's an incredibly difficult
- encryption sequence to crack.
-
- There is one key (up to 255 characters) and 4 switches. Each switch
- will yield a different result.
-
- Now, according to the new law passed a year or so ago, i'm supposed to
- provide a backdoor. (This, btw, is fully unconstitutional). So I
- have. However, since i have no desire to create a program myself that
- could crack it (and none of the resources or time--read on), i will
- give you the alogrithm and anyone who wants is more than welcome to
- write the program.
-
- First of all, the key is variable length, from 0 to 255 characters, and,
- assuming there is no control-keys (which there aren't), there are about
- 223 valid characters (yes, this is case sensitive). Now, without
- the switches, you would have to decode an encrypted program 223*255 + 1
- times...which is about 56865 files. Already, had this encoded file
- been 1k, we've used up about 56megs, and lord knows how long it
- would take to check each and every file...
-
- now, you have to repeat that for each of the switches, either on or off.
- for 4 switches there are about 16 combinations. 56865 x 16 = 909840
- files. we're getting into the gigabytes now.
-
- ...and, of course, that's assuming you are using my alogrithm. if you
- were using some version of you're own, then you might as well give up.
- the combinations sky-rocket here. i doubt ANY supercomputer could
- possibly try to decode it, even if i told what the switches do.
-
- I include the library to my code so that any programmers can use it.
- My original purpose was to encrypt resources. For instance, let's say
- you write a Star Trek action game. You include some STR# resources
- that reveal that you can get a cloaking device. What if you don't
- want a hacker to find that out without playing the game?
-
- Better yet, let's say you copy-protect your software. Anyone who
- knows a thing or two about ResEdit knows that copy-protection, in
- general, doesn't work. Why? Hackers can open the resources and
- read them! Who needs a manual? This encryption will make it virtually
- impossible for such hackers to find (or, in the least, READ) your
- copy-protection.
-
- (I even used the encryption in this program. it works very well)
-
- •Version History
-
- 1.0a: Initial release
- 1.1a: Added the AWB feature, and changed it so that resources that
- already exist won't be written twice (ie no two resource types
- with the same ID).
- 1.2a: Found a minor easter-egg bug, so i removed it. Added the option
- of converting a PICT resource to a StartUpScreen file. Also
- found a bug in which the program would check Cloaker's own
- resources when converting from file to resource.
-
- •Future Enhancements:
-
- I see very few right now. I'm very pleased with this final product.
- The only criticism is the icon i use for "rsrc" files...if you can
- make a better one, let me know!
-
- ...i might disable some features while the program is unregistered.
-
- also: (this isn't an enhancement, really) i might make a quick
- and dirty encryption program using my Whacked code. In a way, i
- have already; the difference is that, when decoded, it's automatically
- a TEXT file (and whatever file you encrypt should be reset to the
- proper creator/file type).
-
- •How much does Cloaker cost?
-
- $5. I suggest you write out a check. If you have internet e-mail,
- let me know--as soon as i get payment, i'll send off your reg code
- asap. with us mail...??
-
- You should be thankful, though, that this version is fully enabled,
- even if you haven't paid shareware.
-
- The cost of the Whacked encryption library is free--the only stipulation
- is that, if you use it, you must include me in the credits (ie "Whacked
- alogrithm by Grant Guenther") i would like i if you included the
- version of the alogrithm--if you look in the header file, it's a
- defined constant.
-
- •How do I contact you?
-
- I typically don't like giving out my mailing address, but it's the
- only way you can send money to me. if you want to contact me, please
- PLEASE do it through internet e-mail. response time is quick and i'm
- generally in a better mood when answering questions or taking complaints
- if done via e-mail. otherwise, you can snail me at:
-
- grant guenther
- 18250 fremont fort dr.
- peyton, co 80831
-
- thru internet:
-
- grant@macshack.usa.net
- cats.godot@ionx.com
- maddie@ctnet.org
-
- (i might even be reached by tbolton@execpc.com, but i wouldn't recommend
- it..)
-
-